import Vue from 'vue'
import Router from 'vue-router'

const login = () => import('@/pages/Login.vue').then(m => m.default)
const index = () => import('@/pages/Index.vue').then(m => m.default)

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: 'login'
    },
    // 登录页
    {
      path: '/login',
      name: 'login',
      component: login,
      meta: {
        isCanQuit: true
      }
    },
    // 主页
    {
      path: '/index',
      name: 'index',
      component: index,
      meta: {
        isCanQuit: true
      }
    }
  ]
})
